package com.veng.springbootdemo.service;

import com.veng.springbootdemo.dao.BookRepository;
import com.veng.springbootdemo.po.Author;
import com.veng.springbootdemo.po.Book;
import org.springframework.beans.factory.annotation.Autowired;

public class BookServiceImp implements BookService {
    @Autowired
    private BookRepository bookRepository;
    @Override
    public void insertBook(String name, Author author) {
        Book book = new Book();
        book.setName(name);
        book.setAuthor(author);
        bookRepository.save(book);
    }
}
